package com.manlost.biz.common.ibatis;

import java.util.ArrayList;

import com.manlost.biz.common.query.PageQuery;

/**
 * @author wqq
 * @param <E>
 */
public class PageQueryList<E> extends ArrayList<E> {

    private static final long serialVersionUID = 1L;
    private PageQuery         query;

    public PageQueryList(PageQuery query) {
        super();
        this.query = query;
    }

    public int getTotalItem() {
        return query.getTotalItem() != null ? query.getTotalItem().intValue() : 0;
    }

    public void setTotalCount(long totalCount) {
        query.setTotalItem(new Long(totalCount));
    }

    public int getTotalPage() {
        return query.getTotalPage();
    }

    public int getPageSize() {
        return query.getPageSize() != null ? query.getPageSize().intValue() : 0;
    }

}
